pub fn convert_base(num_str: &str, base_to: u32) -> String {
    // 解析输入字符串和源进制
    let parts: Vec<&str> = num_str.split('(').collect();
    let num = parts[0];
    let base_from = parts[1].trim_end_matches(')').parse::<u32>().unwrap();

    // 将源进制的数字转换为10进制
    let decimal_value = i64::from_str_radix(num, base_from).unwrap();

    // 将10进制数字转换为目标进制
    let result = format!("{}", decimal_value);
    let converted_value = i64::from_str_radix(&result, 10).unwrap();
    let mut output = String::new();
    let mut temp_value = converted_value;

    while temp_value > 0 {
        let remainder = temp_value % base_to as i64;
        if remainder >= 10 {
            output.insert(0, std::char::from_digit(remainder as u32, base_to).unwrap());
        } else {
            output.insert(0, std::char::from_digit(remainder as u32, base_to).unwrap());
        }
        temp_value /= base_to as i64;
    }

    // 特殊情况：如果结果为空，返回 "0"
    if output.is_empty() {
        output.push('0');
    }

    output
}
